package com.lulin.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lulin.common.utils.PageUtils;
import com.lulin.mall.product.entity.AttrEntity;
import com.lulin.mall.product.entity.ProductAttrValueEntity;
import com.lulin.mall.product.vo.AttrGroupRelationVO;
import com.lulin.mall.product.vo.AttrResponseVO;
import com.lulin.mall.product.vo.AttrVO;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author lulin
 * @email 2032327049@qq.com
 * @date 2022-09-21 14:25:13
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVO attrVO);

    PageUtils queryBasePage(Map<String, Object> params, Long catelogId, String attrType);

    AttrResponseVO getAttrInfo(Long attrId);

    void updateBaseAttr(AttrVO attr);

    void removeByIdsDetails(Long[] attrIds);

    //根据属性组id，查询属性信息
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(AttrGroupRelationVO[] vos);

    PageUtils getNoAttrRelation(Map<String, Object> params, Long attrgroupId);

    /**
     * 通过属性id，查询可以检索的属性编号
     */
    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

